<?php
$pageId = 'findUser';
$bannerSize = count($data['banner']);
//dump($data);
//dump($_ENV);
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <include file="Common/meta" />
    <title>发现人才 - {$_ENV['site'][0]['title']}</title>
    <include file="Common/link" />
</head>
<body>
<include file="Common/header" />
<div class="container container-main">
    <div class="row">
        <if condition="$data['type'] eq 2 OR $data['type'] eq 3">
            <section class="box box-banner">
                <img src="/uploads/demo/banner{$data['type']}.jpg">
            </section>
        </if>
    </div>
    <div class="row">
        <div class="contain-main">
            <section class="box box-index">
                <header class="box-header">
                    <h1 class="box-title">发现人才</h1>
                </header>
                <div class="box-body">
                    <include file="Common/search_condition_user" />
                    <div id="search-empty2" class="content-empty">
                        <div class="picture"></div>
                        <div class="no-data">没有符合条件的相关数据</div>
                    </div>
                    <ul id="user-list" class="list-common"></ul>
                    <div class="page-box">
                        <ul id="user-list-page"></ul>
                    </div>
                </div>
            </section>
        </div>
        <div id="data-box" class="contain-sidebar">
            <include file="Common/sidebar_common" />
        </div>
    </div>
</div>
<include file="Common/script" />
<script src="__PUBLIC__/asset/js/index.js"></script>
<script>
    var page = {
        type: '{$data['type']}',
        keyword: '{$data['key']}',
        searchType: 1,
        searchArea: '{$data['area']}',
        searchIndustry: '{$data['indus']}'
    };
    window.page = page;

    $('.search-box .fa-angle-down').on('click', function () {
        $('#search-select').trigger('click');
    });
    $('#search-btn').on('click', function () {
        page.keyword = $('#search-input').val();
        doSearch();
    });
    $('#search-select').on('change', function () {
        page.searchType = $(this).val();
    });
    function doSearch() {
        var url = '/common/search?type=' + page.searchType + '&key=' + page.keyword + '&area=' + page.searchArea
                + '&indus=' + page.searchIndustry;
        if (page.page) {
            url += '&page=' + page.page;
        }
        location.href = url;
    }
    // 支持回车键搜索
    $('#search-input').on('keydown', function (e) {
        if (e.keyCode === 13) {
            page.keyword = $('#search-input').val();
            doSearch();
        }

    });

    showUser();
    userAjax(true);
</script>
</body>
</html>

